package com.yami.shop.multishop.controller;


import com.yami.shop.bean.model.ProdLevel;
import com.yami.shop.common.response.ServerResponseEntity;
import com.yami.shop.service.ProdLevelService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/prod/level")
@Tag(name = "商品稀有度接口")
public class ProdLevelController {

    @Autowired
    private ProdLevelService prodLevelService;

    @GetMapping("getLevelLists")
    @Operation(summary =  "获取商品级别")
    public ServerResponseEntity<List<ProdLevel>> getLevelLists() {
        List<ProdLevel> lists = prodLevelService.getLists();
        return ServerResponseEntity.success(lists);
    }

}
